Skip to content

transpile: Make unwrapping Paren explicit#1825

Merged
ahomescu merged 5 commits into
immunant:masterfrom
Rua:index_unwrap_parens
Jun 5, 2026
Merged

transpile: Make unwrapping Paren explicit#1825
ahomescu merged 5 commits into
immunant:masterfrom
Rua:index_unwrap_parens

Conversation

@Rua

@Rua Rua commented May 23, 2026

Copy link
Copy Markdown
Contributor

The indexing operation for CExprId now no longer silently unwraps parentheses. I've replaced all indexing operations with index_unwrap_parens so that it's immediately obvious what's going on. Certain uses of it can later be refactored to use plain indexing if it's determined to be safe.

@Rua Rua force-pushed the index_unwrap_parens branch from f304767 to 3902ac2 Compare May 23, 2026 13:04
@Rua Rua changed the title transpile: Make unwrapping Paren explicit, do not unwrap in convert_expr transpile: Make unwrapping Paren explicit May 23, 2026
@Rua Rua force-pushed the index_unwrap_parens branch 2 times, most recently from af3fdeb to 9351ea9 Compare May 23, 2026 13:31
Comment thread c2rust-transpile/src/c_ast/mod.rs Outdated
@Rua Rua force-pushed the index_unwrap_parens branch from 9351ea9 to 2fd0be7 Compare May 30, 2026 10:11
@Rua Rua force-pushed the index_unwrap_parens branch from 2fd0be7 to 2261578 Compare May 30, 2026 10:53
@ahomescu ahomescu merged commit 456f19a into immunant:master Jun 5, 2026
11 checks passed
@Rua Rua deleted the index_unwrap_parens branch June 6, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Macro replacement fails if the macro name is in parentheses

2 participants